<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>添加角色</title>

    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/main.css" media="all">
    <script src="${pageContext.request.contextPath}/lib/layui/layui.js" charset="utf-8"></script>
    <script src="${pageContext.request.contextPath}/js/x-layui.js" charset="utf-8"></script>

    <script>
        layui.use(['form','layer'], function(){});
    </script>


</head>

<body>
<div class="x-body">
    <form action="${pageContext.request.contextPath}/role/add" method="post" class="layui-form layui-form-pane">

        <div class="layui-form-item">
            <label for="rname" class="layui-form-label">
                <span class="x-red">*</span>角色名称
            </label>
            <div class="layui-input-inline">
                <input type="text" id="rname" name="rname" required="" lay-verify="required"
                       autocomplete="off" class="layui-input" value="">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="pids" class="layui-form-label">
                <span class="x-red">*</span>权限列表
            </label>
            <br>
            <div class="layui-input-inline">

                <c:forEach items="${permissions}" var="permission">
                    <input type="checkbox" id="pids"  name="pids" value="${permission.id}"  lay-verify="required">
                    ${permission.name}
                </c:forEach>

            </div>
        </div>

        <div class="layui-form-item">
            <button type="submit" class="layui-btn" lay-submit="" lay-filter="add">添加</button>
        </div>
    </form>
</div>


</body>

</html>